/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.dressingsocial.service;

import com.dressingsocial.model.Vote;
import com.dressingsocial.repository.VoteRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 *
 * @author hayate
 */
@Service
public class VoteService {
    
    @Autowired
    VoteRepository voteRepository;
    
    @Transactional
    public Vote create(Vote vote) {
        Vote createdVote = vote;
        return voteRepository.save(createdVote);
    }
    
}
